@(projects: Seq[Project], todoTasks: Seq[(Task,Project)], user: User)

@main(projects, user){
    
    <header>
        <hgroup>
            <h1>Dashboard</h1>
            <h2>Tasks over all projects</h2>
        </hgroup>
    </header>
    
    <article  class="tasks">
        @todoTasks.groupBy(_._2).map {
            case (project, projectTasks) => {
                <div class="folder" data-folder-id="@project.id">
                    <header>
                        <h3><a href="#@routes.Tasks.index(project.id.get)">@project.name</a></h3>
                        <span class="loader">Loading</span>
                    </header>
                    <ul class="list">
                        @projectTasks.map { 
                            case (task, _) => {
                                @tasks.item(task, isEditable = false)
                            }
                        }
                    </ul>
                </div>
            }
        }
    </article>
    
}

